package com.twq.patternmatch.pattern.kinds

/**
 * Created by tangweiqun on 2017/12/8.
 * 模式的种类-元组模式
 */
object Tuple {
  def main(args: Array[String]): Unit = {
    //6、元组模式(Tuple patterns)
    tupleDemo(("a ", 3, "-tuple"))
  }

  def tupleDemo(expr: Any) = expr match {
    case (a, b, c) => println("matched " + a + b + c)
    case _ =>
  }
}
